const options = {
    url: 'http://localhost:8080/static/data/iconData/dataL.json',
    success: function (result) {
        // console.log(result);
        // console.log(result[1].imgL);
        render(result);
    },
}

function render(data) {
    let res = data.map((item, index) => {
        if (index % 18 === 0 && index != 0) {
            return `$` + `<li><img src="${item.imgL}"></li>`;
        } else {
            return `<li><img src="${item.imgL}"></li>`;
        }
    }).join("").split("$");
    for (var i = 0; i < 8; i++) {
        $('.allIcon>ul').eq(i).append(res[i])
    }
}

$.ajax(options);


const options2 = {
    url: 'http://localhost:8080/static/data/iconData/dataR.json',
    success: function (result) {
        // console.log(result);
        // console.log(result[1].imgR);
        renderR(result);
    },
}

function renderR(data) {
    let res = data.map((item) => {
        return `<div class="allIconR">
                    <img src="${item.imgR}" alt="">
                </div>`
    });
    for (let i = 0; i < data.length; i++) {
        $('.allIconR123').eq(i).append(res[i])
    }
}


$.ajax(options2);